import request from '@/utils/request';

/**
 * 新增作品接口
 * @param data
 */
export function insertWorksInfo(data: any): Promise<any> {
  return request('/sealCuttingApi/worksInfo/insertWorksInfo', {
    method: 'POST',
    data,
  });
}

/**
 * 删除作品接口
 * @param params
 */
export function deleteWorksInfo(params: any): Promise<any> {
  return request('/sealCuttingApi/worksInfo/deleteWorksInfo', {
    method: 'POST',
    params,
  });
}

/**
 * 修改作品接口
 * @param data
 */
export function updateWorksInfo(data: any): Promise<any> {
  return request('/sealCuttingApi/worksInfo/updateWorksInfo', {
    method: 'POST',
    data,
  });
}

/**
 * 查询作品详情接口
 * @param params
 */
export function queryByIdWorksInfo(params: any): Promise<any> {
  return request('/sealCuttingApi/worksInfo/queryByIdWorksInfo', {
    params,
  });
}

/**
 * 根据用户查询当前未投稿的作品接口
 * @param params
 */
export function queryByCreaterIdWorks(params: any): Promise<any> {
  return request('/sealCuttingApi/worksInfo/queryByCreaterIdWorks', {
    params,
  });
}

/**
 * 创作任务投稿接口
 * @param data
 */
export function contributionTask(params: any): Promise<any> {
  return request('/sealCuttingApi/creativeTask/contributionTask', {
    method: 'POST',
    params,
  });
}

/**
 * 查询企业集合
 * @param data
 */
export function queryGroupByCompany(params: any): Promise<any> {
  return request('/sealCuttingApi/user/queryGroupByCompany', {
    params,
  });
}

/**
 * 根据企业查询用户接口
 * @param data
 */
export function queryByCompanyUser(params: any): Promise<any> {
  return request('/sealCuttingApi/user/queryByCompanyUser', {
    params,
  });
}

/**
 * 查询所有征集中的展览接口
 * @param data
 */
export function queryCentralizationExhibition(params: any): Promise<any> {
  return request('/sealCuttingApi/exhibition/queryCentralizationExhibition', {
    params,
  });
}

/**
 * 查询用户所分配词条接口
 * @param data
 */
export function queryByUserNameEntry(params: any): Promise<any> {
  return request('/sealCuttingApi/entryInfo/queryByUserNameEntry', {
    params,
  });
}

/**
 * 新增创作任务接口
 * @param data
 */
export function insertCreativeTask(data: any): Promise<any> {
  return request('/sealCuttingApi/creativeTask/insertCreativeTask', {
    method: 'POST',
    data,
  });
}

/**
 * 修改创作任务接口
 * @param data
 */
export function updateCreativeTask(data: any): Promise<any> {
  return request('/sealCuttingApi/creativeTask/updateCreativeTask', {
    method: 'POST',
    data,
  });
}

/**
 * 代传创作任务接口
 * @param data
 */
export function generationUploadWorksInfo(data: any): Promise<any> {
  return request('/sealCuttingApi/worksInfo/generationUploadWorksInfo', {
    method: 'POST',
    data,
  });
}

/**
 * 审核通过
 * @param params
 */
export function insertEndDraft(params: any) {
  return request('/sealCuttingApi/worksInfo/insertEndDraft', {
    method: 'POST',
    params,
  });
}

/**
 * 删除作品
 * @param data
 */
export function delCommentList(data: any) {
  return request(`/sealCuttingApi/worksComment/delCommentList?commentIdList=${data}`, {
    method: 'GET',
  });
}
